﻿<%@ Page Language="C#" AutoEventWireup="true" CodeBehind="mfTouristInfo.aspx.cs" Inherits="msBsc.WebUi.mMall.Buyer.mfTouristInfo" %>

<!DOCTYPE html>

<html xmlns="http://www.w3.org/1999/xhtml">
<head>
    <title>手机地接客商城</title>
    <%=getMeta()%>
    <link rel="stylesheet" type="text/css" href="/themes/mStyle1/mGlobal.css" charset="gbk" />
    <link rel="stylesheet" type="text/css" href="/themes/mStyle1/css/home/base.css" charset="gbk" />
    <link rel="stylesheet" type="text/css" href="/themes/mStyle1/css/public/mLogin.css" charset="gbk" />
    <link href="/themes/mStyle1/css/Buyer/mTouristInfo.css" rel="stylesheet" />
    <%=getBodyBeforeJs()%>
    <script src="/??jqPlugin/js/jquery-1.8.3.min.js,js/jBase.js,js/jmPage.js,themes/Style1/jsQt.js,jqPlugin/js/laytpl.js,themes/wStyle1/js/comm/VerifyJs.js,themes/wStyle1/js/comm/DateInfo.js"
        type="text/javascript"></script>
    <script type="text/javascript" src="/jqPlugin/js/jBase.js"></script>
    <script type="text/javascript">
        $(window).load(function () {
        });
        //        $(window).bind('resize', function () { _self._ResizeHandler(_self); })
        //        .bind('scroll', function () { _self._ResizeHandler(_self); });
    </script>
    <!--head fix rgn-->
    <style type="text/css">
    </style>
    <base target="_self" />
</head>
<body>
    <div class="viewport">
         <%=msBsc.WebUi.Code.QtHtmlGet.GetWapHeaderMenuHtml(true) %>
        <form action='#' method="post" id="J_EmailForm">
            <div class="t_Header">
                <div>
                    <img class="u_Avatar" id="headPhoto" src="" />
                </div>
                <div style="margin-top: 20px;">
                    <a class="u_Name" id="u_Name"></a>
                    <img id="img_gender" class="u_Sex" />
                </div>
            </div>
            <div class="m_t_type">
                <a class="m_t_img m_t_basic"></a><span class="m_t_name">基本信息</span>
            </div>
            <div style="margin-top: 20px;">
                <div class="t_content">
                    <div class="t_cell_1">昵称:</div>
                    <div class="t_cell_2" id="u_Nicke"></div>
                </div>
                <div class="t_content">
                    <div class="t_cell_1">性别:</div>
                    <div class="t_cell_2" id="u_gender"></div>
                </div>
                <div class="t_content">
                    <div class="t_cell_1">生日:</div>
                    <div class="t_cell_2" id="u_birth"></div>
                </div>
                <div class="t_content">
                    <div class="t_cell_1">所在地:</div>
                    <div class="t_cell_2" id="u_address"></div>
                </div>
            </div>
            <div class="m_t_type">
                <a class="m_t_img"></a><span class="m_t_name">联系方式</span>
            </div>
            <div style="margin-top: 20px;">
                <div class="t_content">
                    <div class="t_cell_1">移动电话:</div>
                    <div class="t_cell_2" id="u_mobile"></div>
                </div>
                <div class="t_content">
                    <div class="t_cell_1">固定电话:</div>
                    <div class="t_cell_2" id="u_phone"></div>
                </div>
                <div class="t_content">
                    <div class="t_cell_1">QQ:</div>
                    <div class="t_cell_2" id="u_QQ"></div>
                </div>
                <div class="t_content">
                    <div class="t_cell_1">邮箱:</div>
                    <div class="t_cell_2" id="u_email"></div>
                </div>
                <div class="t_content">
                    <div class="t_cell_1">微信:</div>
                    <div class="t_cell_2" id="u_wechat"></div>
                </div>
            </div>
            <div>
                <button type="button" class="btn btn-large btn_size" onclick="changeInfo()">修改个人资料</button>
            </div>
            <%--   <div class="new-txt-err" id="err" style="display: none;">
            </div>
            <div style="margin-top: 26px;">
                用户名/邮箱：
            </div>
            <div>
                <div class="c_input">
                    <a class="input_user"></a>
                    <input type="text" value="" name="username" id="username" placeholder="请输入用户名/邮箱" onkeydown="changeColor(0,event)">
                </div>

            </div>
            <div style="margin-top: 6px;">
                登录密码：
            </div>
            <div>
                <div class="c_input">
                    <a class="input_pwd"></a>
                    <input type="password" value="" name="password" id="password" placeholder="请输入密码" onkeydown="changeColor(1,event)">
                </div>
            </div>
            <input type="hidden" id="remember" value="true" name="remember">
            <div>
                <button type="button" class="btn btn-large btn_size" id="J_BtnEmailForm">登  录</button>
            </div>
            <div class="f_pwd">
                <a>忘记密码?</a>
            </div>--%>
            <%=msBsc.WebUi.Code.QtHtmlGet.GetWapMenuHtml() %>
        </form>
        <script type="text/javascript">
            $("#h_title").text("个人资料");
            $.getMessageCount();
            function btnDo() {
                var _jsParam = new jsonRow();
                _jsParam.AddCell("ACTION", "init");
                ajaxComm(_jsParam);
            };
            btnDo();
            //显示个人资料
            function showUserInfo(data) {
                $("#headPhoto").attr("src", getUserPhoto(data.rows[0].CUSTOMER_DEFAULT_PIC, data.CUSTOMER_BASEINFO_GENDER) + " 114x114img.jpg");
                //$("#imgHead").html("<img src='/Filters/Djack/" + getUserPhoto(data.HeadPhotoName, data.Gender) + "' />");
                if (!IsNull(data.rows[0].CUSTOMER_NICK)) {
                    $("#u_Name").text(data.rows[0].CUSTOMER_NICK);
                    $("#u_Nicke").text(data.rows[0].CUSTOMER_NICK);
                }

                if (!IsNull(data.rows[0].CUSTOMER_BASEINFO_GENDER)) {
                    if (data.rows[0].CUSTOMER_BASEINFO_GENDER == "M") {
                        $("#u_gender").text("男");
                        $("#img_gender").attr("src", "/themes/wStyle1/Images/Public/man.png");
                    } else {
                        $("#u_gender").text("女");
                        $("#img_gender").attr("src", "/themes/wStyle1/Images/Public/woman.png");
                    }
                }
                if (!IsNull(data.rows[0].CUSTOMER_BASEINFO_BIRTH)) {
                    $("#u_birth").text(formatDate(new Date(data.rows[0].CUSTOMER_BASEINFO_BIRTH), false));
                }

                if (!IsNull(data.rows[0].COUNTRYNAME) && !IsNull(data.rows[0].CITYNAME) && !IsNull(data.rows[0].DISTINANAME)) {
                    $("#u_address").text(data.rows[0].COUNTRYNAME + "/" + data.rows[0].CITYNAME + "/" + data.rows[0].DISTINANAME);
                }

                if (!IsNull(data.rows[0].CUSTOMER_BASEINFO_MOBILE)) {
                    $("#u_mobile").text(data.rows[0].CUSTOMER_BASEINFO_MOBILE);
                } 

                if (!IsNull(data.rows[0].CUSTOMER_BASEINFO_PHONE)) {
                    $("#u_phone").text(data.rows[0].CUSTOMER_BASEINFO_PHONE);
                }

                if (!IsNull(data.rows[0].CUSTOMER_BASEINFO_QQ)) {
                    $("#u_QQ").text(data.rows[0].CUSTOMER_BASEINFO_QQ);
                }

                if (!IsNull(data.rows[0].CUSTOMER_BASEINFO_EMAIL)) {
                    $("#u_email").text(data.rows[0].CUSTOMER_BASEINFO_EMAIL);
                }

                if (!IsNull(data.rows[0].CUSTOMER_WECHAT_NO)) {
                    $("#u_wechat").text(data.rows[0].CUSTOMER_WECHAT_NO);
                }
            }

            //修改个人资料
            function changeInfo() {
                window.location.href = "/m/mb_ChangeTouristInfo.htm";
            }

            function getUserPhoto(userPhoto, sex) {
                if (userPhoto != undefined && userPhoto != null && userPhoto != "") {
                    return userPhoto;
                }
                if (sex == "M") {
                    return "man.jpg";
                } else if (sex == "F") {
                    return "wman.jpg";
                } else {
                    return "djack.jpg";
                }
            }
        </script>
    </div>
</body>
<%=getBodyAfterJs() %>
</html>
